Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyprctl: link to much less libraries #7212

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

sliedes
Copy link
Contributor

@sliedes sliedes commented Aug 7, 2024

I got annoyed by latency caused by implementing some operations in shell scripts; particularly if the shell script needed to read some status using hyprctl and then decide to do more hyprctl executions.

Describe your PR, what does it fix/add?

This makes hyprctl start significantly faster.

$ time for ((i=0; i<1000; i++)); do hyprctl/hyprctl -j activewindow >/dev/null; done

Before: 12.269 s (about 12.3 ms/execution)
After: 2.142 s (about 2.1 ms/execution)

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

The one thing I don't like is how this adds another mention (and version constraint) of hyprutils>=0.2.1 in the top level CMakeLists.txt. I don't understand CMake well enough to tell if the deps could be made to somehow inherit hyprctl_deps.

Is it ready for merging, or does it need work?

I believe it is ready to merge as is, unless you know a way to only mention hyprutils once :)

This makes hyprctl start significantly faster.

$ time for ((i=0; i<1000; i++)); do hyprctl/hyprctl -j activewindow >/dev/null; done

Before: 12.269 s (about 12.3 ms/execution)
After: 2.142 s (about 2.1 ms/execution)
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit d5bc3eb into hyprwm:main Aug 7, 2024
10 checks passed
@sliedes sliedes deleted the hyprctl-deps branch August 12, 2024 20:56
adomixaszvers added a commit to adomixaszvers/dotfiles-nix that referenced this pull request Oct 19, 2024
adomixaszvers added a commit to adomixaszvers/dotfiles-nix that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants